import request from '@/utils/request'


// 用户异性列表
export function getOtherGenderList(id,data) {
	return request({
		url: '/app/wx/user/otherGenderList?id='+id,
		method: 'post',
		data:data
	})
}

// 获取微信用户信息
export function getInfo(query) {
  return request({
    url: '/app/wx/user',
    method: 'get',
    params: query
  })
}

// 完善个人信息
export function detail(query) {
  return request({
    url: '/app/wx/user/detail',
    method: 'put',
    params: query
  })
}

export function updateWxUser(query) {
  return request({
    url: '/app/wx/user',
    method: 'put',
    params: query
  })
}
// 获取择偶标准
export function selection(wxUserId) {
	return request({
		url: '/app/wx/require/' + wxUserId,
		method: 'get',
	})
}

// 修改择偶标准
export function addSelection(data) {
	return request({
		url: '/app/wx/require',
		method: 'post',
		data: data
	})
}
//获取用户/异性详情
export function getUserDetail(id) {
  return request({
    url: '/app/wx/user/detail?userId='+id,
    method: 'get'
  })
}
//发起查看微信号申请
export function getNumber(queryUserId,wxUserId) {
  return request({
    url: '/app/order/hlckwx/create?queryUserId='+queryUserId+'&wxUserId='+wxUserId,
    method: 'get'
  })
}
//创建婚恋查看微信订单
export function create(queryUserId,wxUserId) {
  return request({
    url: '/app/order/hlckwx/create?queryUserId='+queryUserId+'&wxUserId='+wxUserId,
    method: 'get'
  })
}
//查看异性微信号付款状态
export function checkGetNumber(orderId) {
  return request({
    url: '/app/order/hlckwx/paySuccess?orderId='+orderId,
    method: 'get'
  })
}
//创建婚恋在线聊天订单
export function getChat(queryUserId,wxUserId) {
  return request({
    url: '/app/order/hlzxlt/create?queryUserId='+queryUserId+'&wxUserId='+wxUserId,
    method: 'get'
  })
}
//检查婚恋在线聊天订单付款状态
export function checkGetChat(orderId) {
  return request({
    url: '/app/order/hlzxlt/paySuccess?orderId='+orderId,
    method: 'get'
  })
}
//个人认证新增
export function auth(data) {
  return request({
    url: '/app/wx/auth',
    method: 'post',
	data: data
  })
}
//个人认证详情
export function getAuth(id) {
  return request({
    url: '/app/wx/auth/'+id,
    method: 'get'
  })
}
//某一项个人认证详情
export function getCertainAuth(id,type) {
  return request({
    url: '/app/wx/auth/certain?wxUserId='+id+"&type="+type,
    method: 'get'
  })
}
//个人认证修改
export function updateAuth(data) {
  return request({
    url: '/app/wx/auth',
    method: 'put',
	data: data
  })
}
//上传图片
export function uploadImg(query) {
  return request({
    url: '/app/common/upload',
    method: 'post',
	params: query
  })
}
//查询用户互动申请列表
export function interactApply(receiverId) {
  return request({
    url: '/app/ypp/interactApply/list?receiverId='+receiverId+'&dataType=0',
    method: 'get'
  })
}
//查询用户互动申请列表聊天
export function interactApplytype(receiverId) {
  return request({
    url: '/app/ypp/interactApply/list?receiverId='+receiverId+'&dataType=1',
    method: 'get'
  })
}
//修改互动申请确认状态
export function confirm(id,status) {
  return request({
    url: '/app/order/hlckwx/confirm?id='+id+'&status='+status,
    method: 'get'
  })
}
//查看异性微信号
export function wxNumber(userId,dataId) {
  return request({
    url: '/app/wx/user/number?userId='+userId+'&dataId='+dataId,
    method: 'get'
  })
}

//查看系统消息
export function systemList(wxUserId) {
  return request({
    url: '/app/wx/message/listAll?wxUserId='+wxUserId,
    method: 'get'
  })
}
//系统消息已读
export function systemRead(wxUserId) {
  return request({
    url: '/app/wx/message/read?wxUserId='+wxUserId,
    method: 'get'
  })
}

//使用人新增
export function userAdd(data) {
	return request({
		url: '/app/ypp/user/add',
		method: 'post',
		data:data
	})
}
//使用人修改
export function userEdit(data) {
  return request({
    url: '/app/ypp/user/edit',
    method: 'post',
    data:data
  })
}
//使用人查询
export function userSelect(id) {
  return request({
    url: '/app/ypp/user/'+id,
    method: 'get'
  })
}
//使用人查询列表
export function userList(query) {
  return request({
    url: '/app/ypp/user/list',
    method: 'get',
	params:query
  })
}
//删除使用人
export function userdelete(id) {
  return request({
    url: '/app/ypp/user/'+id,
    method: 'delete'
  })
}